package com.dopeydev.broadcast;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.google.android.gms.maps.model.LatLng;

public class FragmentManagerBroadcast extends BroadcastReceiver {

	public interface Action {

		public static final String LOCATION_ACQUIRED = "com.dopeydev.location_acquired";
		public static final String ZOOM_TO_LOCATION = "com.dopeydev.zoom_to_location";

	}

	public interface Extras {
		public static final String LATITUDE = "com.dopeydev.latitude";
		public static final String LONGITUDE = "com.dopeydev.longitude";

	}

	@Override
	public void onReceive(Context context, Intent intent) {

		String action = intent.getAction();
		if (action.equalsIgnoreCase(Action.LOCATION_ACQUIRED)) {
			locationAcquired();
		} else if (action.equalsIgnoreCase(Action.ZOOM_TO_LOCATION)) {
			int latitude = intent.getIntExtra(Extras.LATITUDE, 0);
			int longitude = intent.getIntExtra(Extras.LONGITUDE, 0);
			LatLng location = new LatLng(latitude, longitude);
			zoomToLocation(location);
		}

	}

	public void locationAcquired() {

	}

	public void zoomToLocation(LatLng currentLocation) {

	}

}
